package com.qf.exception;

import com.qf.enums.AppEnum;
import lombok.Getter;

/**
 *
 * 自定义异常
 *      项目中可能抛出的异常
 *
 */

@Getter
public class AppException extends RuntimeException {

    private Integer code;

    public AppException(Integer code, String message) {
        super(message);
        this.code = code;
    }
    public AppException(AppEnum poorEnum) {
        super(poorEnum.getMsg());
        this.code = poorEnum.getCode();
    }
}
